/**
 * keywords mongoose dao(CURD)
 */

var mongoose = require('mongoose'),
    Schema = mongoose.Schema,
    ObjectId = require('mongoose').Types.ObjectId,
    keywordSchema;


//var contentbank = mongoose.createConnection('mongodb://contentbank:ContentBank4.2@111.204.165.5:27017/contentbank');
var contentbank = mongoose.createConnection('mongodb://scrapy:scrapy.pwd@111.204.165.5:27017/scrapy');


// 完整的keywords
keywordSchema = new Schema({
    "title": String,
    "nicks": Array,
    "description": String
});


// 激活model
var Keyword = contentbank.model('keyword', keywordSchema),k = new Keyword;
k.save(function(){
    console.log('keyword连接成功');
});


exports.Keyword = Keyword;
